package com.lyf.scm.common.enums;

import java.util.ArrayList;
import java.util.List;

/**
 * description:其他渠道销售计划对应枚举
 *
 * @author: huangtao
 * @data: 2020/7/31
 */
public enum SalesPlanOtherEnum {

    /**
     * 上次计划量
     */
    LAST_PLAN_QTY("lastPlanQty","上次计划量"),
    /**
     * 上次确认量
     */
    LAST_CONFIRMED_QTY("lastConfirmedQty","上次确认量"),
    /**
     * 计划量
     */
    PLAN_QTY("planQty","计划量"),
    /**
     * 下级确认量
     */
    SUBORDINATE_CONFIRMED_QTY("subordinateConfirmedQty","下级确认量"),
    /**
     * 确认量
     */
    CONFIRMED_QTY("confirmedQty","确认量"),
    /**
     * 计划与确认差值
     */
    PLAN_CONFIRMED_DIFFERIN("planConfirmedDifferin","计划与确认差值"),
    /**
     * 计划与确认比例
     */
    PLAN_CONFIRMED_PROPORTION("planConfirmedProportion","计划与确认比例"),

    ACTUAL_SALES_QTY("actualSalesQty","实际销量");

    private String code;
    private String desc;

    SalesPlanOtherEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    /**
     * 指标的枚举顺序为excel导出时候指标的顺序
     *
     * @param
     * @return {@link List <String>}
     **/
    public static List<String> getAllTargetsDesc(Integer level) {
        List<String> targetsDesc = new ArrayList<>();
        for (SalesPlanOtherEnum item : SalesPlanOtherEnum.values()) {
            if (level == 1) {
                if ("下级确认量".equals(item.getDesc())) {
                    continue;
                }
            }
            targetsDesc.add(item.getDesc());
        }
        return targetsDesc;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
